package com.redis;

import com.redis.service.JedisClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * @Auther: Administrator
 * @Date: 2018/9/15 0:18
 * @Description:
 */
@Component
public class MyApplicationRunner implements ApplicationRunner {

    @Autowired
    private JedisClient jedisClient;

    @Override
    public void run(ApplicationArguments applicationArguments) throws Exception {
        jedisClient.set("hello","小明");
        System.out.println(jedisClient.get("hello"));
    }
}